<%
//用户
var user = shiro.getUser();
//设备
layout("/inc/layout.html",{
title:'设备登记列表',
keywords:'设备登记列表',
description:'设备登记列表',
style:'user.css'
}){
%>
    <!--项目发布-->
    <section class="container">
    <div class="row mt15">
       <div class="panel panel-info">
          			<div class="panel-heading text-left">
				<ul class="nav nav-tabs">
					<li ><a href="/fooddrugApply/base"><b>食品经营许可证办理</b></a></li>
					<li class="active"><a href="/fooddrugChange/index"><b>食品经营许可证变更</b></a></li>
					<li><a href="/fooddrugCancel/base"><b>食品经营许可证注销</b></a></li>
				</ul>
			</div>
            <div class="panel-body">
                <!--项目状态-->
  <legend><span class="text text-danger" id="messageCode">设备登记</span></legend>
   <a href="/fooddrugChange/device?changeId=${changeId!}">
   <button id="button" class="btn btn-info ">&nbsp;新增&nbsp;</button>
   </a>
       <input type="hidden" id="changeId" value="${changeId!}">
    <!--主题内容-->
    <div class="table-responsive">
        <table id="deviceList"></table>
    </div>
            </div>
           <div class="panel-footer">
                <div class="col-sm-offset-3 clearfix">
                    <div class="mt5 mb5 block col-sm-3">
                        <a href="/fooddrugChange/managerList?changeId=${changeId}" class="btn btn-warning btn-lg btn-outline btn-block">上一步</a>
                    </div>
                    <div class="mt5 mb5 block col-sm-3">
                        <button type="button" id="submitChange" class="btn btn-danger btn-lg btn-outline btn-block">提交</button>
                    </div>
                </div>
            </div>
        </div>
</div>     
    </section>

<% } %>
<script>
    require(['modules/fooddrug_device'], function (fooddrugDevice) {
    	fooddrugDevice.list();
    });
    //列表参数
    function operateFormatter(value, row, index) {
        var tempCode = "";
        tempCode += '<button type="button" class="delete btn btn-default btn-xs"><i class="iconfont icon-shanchu"></i>&nbsp;删除&nbsp;</button>';
        tempCode += '<a href="/fooddrugChange/query/device/'+row.id+'" class="update btn btn-default btn-xs"><i class="iconfont icon-huaban"></i>&nbsp;修改&nbsp;</a>';
        return '<div class="btn-group">' + tempCode + '</div>';
    }
</script>
</body>
</html>